package com.example.demo.domain;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import java.io.Serializable;

/**
 * 所有entity父类
 *
 * @author Jack
 * @version V1.0
 * @Title:
 * @Description: 所有entity父类
 * @date 2017/10/30 10:26
 */
@MappedSuperclass
public class BaseEntity implements Serializable {
    private static final long serialVersionUID = -4742379522421238421L;

    protected Long id;


    /* 实体的状态 */
    protected int status;

    /* 创建的时间 */
    protected Long createTime;

    /* 修改时间 */
    protected Long lastModifyTime;


    @Id
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "status")
    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    @Column(name = "create_time")
    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    @Column(name = "last_modify_time")
    public Long getLastModifyTime() {
        return lastModifyTime;
    }

    public void setLastModifyTime(Long lastModifyTime) {
        this.lastModifyTime = lastModifyTime;
    }
}
